﻿using CPPEI.Coolzon.Common;
using CPPEI.Coolzon.Service.Contract;
using CPPEI.Coolzon.UI.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UI.Views.EventProxies
{
    public class RespResetSolutionEventHandler : BaseResponseHandler<RespResetSolutionData>
    {
        protected override void OnHandle(RemoteEventProxy remoteEventProxy, ServiceProxy.MainServiceRef.Response response, RespResetSolutionData responseData)
        {
            if (responseData.IsSuccess)
            {
                remoteEventProxy.RenderView.ResetSolution();
                //// 重置当前方案
                //// 默认显示到第一个场景上
                //UI.Data.OpenSceneArgs openSceneArgs = new UI.Data.OpenSceneArgs();
                //openSceneArgs.ParametersString.Add("sys:isresetviewstate", "true");
                //remoteEventProxy.RenderView.OpenScene(SwitchMode.Replace, "", "", UIContext.Current.Solution.Scenes.First().Name, openSceneArgs);
            }
        }
    }
}
